package com.becca.cake.dao.system;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.system.Node;
import com.becca.cake.model.system.PostDO;

/**
 * 岗位管理DAO
 * @author hejinguo
 * @version $Id: PostDAO.java, v 0.1 2013-12-17 下午12:29:00
 */
@Repository
public interface PostDAO {
    /**
     * 查询岗位对应的功能菜单
     * @author hejinguo
     * @param map
     * @return
     */
    List<Node> selectPostTree(Long id) throws DataAccessException;

    /**
     * 根据ID查询岗位信息
     * @author hejinguo
     * @param id
     * @return
     * @throws DataAccessException
     */
    Node selectPostById(Long id) throws DataAccessException;

    /**
     * 根据ID查询岗位信息
     * @author hejinguo
     * @param postId
     * @return
     * @throws DataAccessException
     */
    PostDO selectPostMsgById(String postId) throws DataAccessException;

    /**
     * 添加岗位信息
     * @author hejinguo
     * @param postDO
     * @throws Exception
     */
    void insertPost(PostDO postDO) throws DataAccessException;

    /**
     * 修改岗位信息
     * @author hejinguo
     * @param postDO
     * @throws Exception
     */
    void updatePostById(PostDO postDO) throws DataAccessException;

    /**
     * 根据员工id删除岗位信息
     * @author hejinguo
     * @param id
     * @throws DataAccessException
     */
    void deletePostById(Long id) throws DataAccessException;

    /**
     * 添加员工岗位信息
     * @author hejinguo
     * @param map
     * @throws DataAccessException
     */
    void insertAdminPost(Map<String, Object> map) throws DataAccessException;
}
